mobilizing enter button and adding 'if' statement for logout button