made password work
Added handling for no key error