Fixed index error if username was submitted without password