Working login script and logout button.