login and registration almost complete