somewhat working version, login and submit