Added functionality to check if username already exists