Added user permissions and login/out.