added logout page, fixed redirection