Check voltage - low voltage will cause some of the behavior you are describing. Also check that terminals are completely tight. If you have an aftermarket alarm, it can also lock out the ignition after a battery reconnect - arm and disarm whatever alarm you have.