Login can be made using username or email

Small changes in the actions only allowed by registered users