I can confirm that this bug also occurs on macOS (Sierra) and Linux (Ubuntu 16.04 and 17.04). I run a Minecraft 1.6.4 server. As with the OP, using the old Java-based launcher does work, but the current launcher fails with 'Bad login'.
According to the LWJGL developers, this bug has been fixed, but Minecraft uses an older version of LWJGL which doesn't contain the fix. So Minecraft should update its version.
See here: https://github.com/LWJGL/lwjgl/issues/129#issuecomment-189235820
The problem is in how LWJGL interprets XRANDR's output, because if I manipulate XRANDR's output to tell LWJGL there is only one screen connected LWJGL doesn't give a fault and the game works. Apparently LWJGL chokes when a screen is connected but not turned on - like when you play on an external monitor and your laptop screen is disabled, like it is in my case.
Since most games on Linux use xrandr - without any issues - the problem lies in LWJGL. This library is supplied by Minecraft and thus your responsibility.
Xrandr IS installed, as it is in every Ubuntu desktop install. And since other games and older Minecraft versions work correctly, this is a Minecraft issue.
Thanks, Stuart and Pokechu22! I can confirm that this workaround works on Linux, using version 2.0.391-dev-linux. Hopefully a developer can fix this properly soon.