add post func - works, but problems with login func