implements working auth login with frontend