adding user access functionality