Added functionality to account for null returns from database query
Finished assignment. Login possible, registration checks for existing emails,