@startuml class AuthController { +__construct (model : AuthModel) + displayRegister() : HttpResponse + register(request : array,session : MutableSessionHandle) : HttpResponse + displayLogin() : HttpResponse + login(request : array , session : MutableSessionHandle) : HttpResponse } AuthController --> "- model" AuthModel class AuthModel { +__construct(gateway : AccountGateway) + register(username : string, password : string, confirmPassword : string, email : string, failures : array): Account + generateToken() : string + login(email : string, password : string) } AuthModel --> "- gateway" AccountGateway class AccountGateway { -con : Connection +__construct(con : Connection) + insertAccount(name : string, email : string, hash : string, token : string) : int + getRowsFromMail(email : string): array + getHash(email : string) : array + exists(email : string) : bool + getAccountFromMail(email : string ): Account + getAccountFromToken(email : string ): Account } @enduml