login script complete, redirects to homepage once logged in