Perform check for user permissions on login. Still waiting on some changes don on ICAT
Added function decorator to make sure session is still valid