Added password checking and keyboard hiding