changed login flow, not using javascript anymore