changed login to use post