reformatted login.ts