Part of users_controller behaviour