Fixed login redirect, add if-else to determine if user is logged in, added dashboard page.