Added conditional to redirect if logged in.