Added error checking to login view and navigation bar to master controller