update authentication, message, reset password functions and improve templates