redirects and logging out added