Removed whitespace and edited user status code

removed extra whitespace and changed all code checking if user was
logged in with @login_required decorator