finish login function (+DB)