login algorithm that checks whether the user wants to change their password or not, and prevents blanks