Changed the else statement to redirect to login page
Removed else statement completely