cleans up code and fixes show/hide for login page