login fuctions completed