Added code to stop user from logging in twice quickly