Initial log in code and user parsing

Current problem: How do i find the current user without parsing html?