Rework oauth2 frontend side