Edited login functionality and restricted routes