Fix crash/error on main menu

Easy to reproduce, start minetest in such a way that the Client tab
opens first, with the username box already filled in. (in other words,
you've played it before, and used Client last time). The password box
will have focus. Press cursor up. Lua 'crash'.
fix ele if