Handle login and switch user with devise

- Handle login and switch user with devise.