Added login redirect and logout