Moved userID encryption and added method to switch