Refactor log in/sign up toggle js